//
//  DetailsFirstCell.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 16/6/7.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import "DetailsFirstCell.h"

@implementation DetailsFirstCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        CGFloat margin = 10;
        self.detailsName = [[UILabel alloc] initWithFrame:CGRectMake(12,margin,self.width-margin*2, 15)];
        self.detailsName.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_detailsName];
        
        CGFloat heartW = 15;
        CGFloat heartM = 5;
        for (int i = 0; i < 5; ++i) {
            self.detailsHeartImg = [[UIImageView alloc] init];
            _detailsHeartImg.frame = CGRectMake(12+(heartW + heartM)*i,CGRectGetMaxY(_detailsName.frame)+10,heartW,12);
            self.detailsHeartImg.image = [UIImage imageNamed:@"shangjia_0"];
            [self addSubview:_detailsHeartImg];
        }
        
        self.detailsNum = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_detailsHeartImg.frame)+10,_detailsHeartImg.y,20,10)];
        _detailsNum.textColor = DEFAULT_COLOR;
        _detailsNum.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_detailsNum];
        
        
    }
    return self;
}

@end
